package com.gecba.system.entity;

import com.gecba.minio.enums.ContentType;
import com.gecba.system.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;

@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "sys_oss_file")
@ApiModel(value = "系统分布式文件")
@DynamicInsert
@DynamicUpdate
public class SysOssFile extends BaseEntity {

    /** 文件名称 */
    private String fileName;

    /** 文件公网访问地址 */
    private String fileUrl;

    /** 文件系统访问路径 */
    private String fileUri;

    /** 源文件名称 */
    private String sourceFileName;

    /** 文件类型 */
    @Enumerated(EnumType.STRING)
    private OssFileType fileType;

    /** 文件状态 */
    @Enumerated(EnumType.STRING)
    private OssFileState fileState;

    @Enumerated(EnumType.STRING)
    private ContentType contentType;

    private Long fileSize;

}
